package com.studentmanagement.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.studentmanagement.model.Enrollment;

public interface EnrollmentMapper {

    // 添加选课记录
    int insertEnrollment(Enrollment enrollment);

    // 更新选课记录
    int updateEnrollment(Enrollment enrollment);

    // 删除选课记录
    int deleteEnrollment(Integer enrollmentId);

    // 根据ID查询选课记录
    Enrollment selectEnrollmentById(Integer enrollmentId);

    // 查询所有选课记录
    List<Enrollment> selectAllEnrollments();

    // 分页查询选课记录列表
    List<Enrollment> selectEnrollmentsByPage(Map<String, Object> params);

    // 获取选课记录总数
    int selectEnrollmentCount();

    // 根据学生ID查询选课记录
    List<Enrollment> selectEnrollmentsByStudentId(Integer studentId);

    // 根据课程ID查询选课记录
    List<Enrollment> selectEnrollmentsByCourseId(Integer courseId);
}